<template>
  <div class="flex_col">
    <div class="s_title">已选人员</div>

    <div style="margin: 10px 0 20px">
      <el-tag
        v-for="tag in selList"
        :key="tag.name"
        closable>
        {{ tag.name }}
      </el-tag>
    </div>

    <el-form
      ref="queryParams"
      :model="queryParams"
      label-width="68px"
      class="card_0">

      <el-row :gutter="15">

        <el-col :span="8">
          <el-form-item label="用户信息" prop="carNo">
            <el-input
              v-model="queryParams.name"
              placeholder="请输入用户名或用户手机号"
              :maxlength="8"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label-width="0px">
            <el-button
              type="primary"
              icon="el-icon-search"
              size="mini"
              @click="handleQuery"
            >搜索
            </el-button
            >
            <el-button icon="el-icon-refresh" size="mini" @click="ResetQuery"
            >重置
            </el-button
            >
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <div style="height: 20px"></div>

    <el-table :data="storeList" border :header-cell-style="{background:'#eef1f6',color:'#606266'}">

      <el-table-column
        type="selection"
        width="55">
      </el-table-column>
      <el-table-column align="center" label="用户编号" prop="name"></el-table-column>
      <el-table-column align="center" label="用户名称" prop="member"></el-table-column>
      <el-table-column align="center" label="部门" prop="name"></el-table-column>
      <el-table-column align="center" label="角色" prop="isActive"></el-table-column>
      <el-table-column align="center" label="手机号码" prop="isActive"></el-table-column>
    </el-table>

    <pagination
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <div class="bottom-layout">
      <el-button type="primary" @click="commit">确定</el-button>
      <el-button @click="cancelQuery">取消</el-button>
    </div>

  </div>
</template>

<script>
export default {
  name: "memberSet",
  data() {
    return {
      selList: [{
        name: '一给个',
      }, {
        name: 'er给个',
      }, {
        name: 'gf 给个',
      }],
      queryParams:{
        name:'',
        pageNum:1,
        pageSize:10
      },
      storeList:[
        {
          name:'A门店',
          member:"店长A、员工B、员工C......",
          isActive:true
        },
        {
          name:'B门店',
          member:"",
          isActive:false
        },
      ],
    }
  },
  methods:{
    getList(){

    },

    cancelQuery() {
      this.$emit("cancel", true);
    },
  }
}
</script>

<style scoped>
.flex_col {
  display: flex;
  flex-direction: column;
}

.s_title {
  font-weight: bold;
  color: #606266;
  font-size: 14px;
  position: relative;
  margin: 10px 0;
}

.el-tag {
  margin-right: 10px;
}

.bottom-layout{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 40px 0 0;
}
</style>
